All Functions Used on PO33Q

list

{base}

Create a list object

attr

{base}

Access or modify the attributes of an object

rnorm

{base}

Generate random numbers from a normal distribution

seq

{base}

Create a sequence

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

str

{utils}

Get the structure of an R object

lm

{stats}

Fit linear models using least squares

data.frame

{base}

Create a data.frame from vectors

ifelse

{base}

Return a or b depending on the value of test

regTermTest

{regress}

Perform statistical tests for individual regression coefficients

factor

{base}

Create factor variables

sample

{base}

Takes a sample of the specified size

as.data.frame

{base}

Functions to check if an object is a data frame, or coerce it if possible.

factor

{base}

Create a factor

predict

{stats}

Generate predicted values from model objects

pnorm

{base}

Returns the cumulative distribution function (CDF) of the normal distribution

nobs

{stats}

Return the number of observations in a model object

round

{base}

Rounds numbers

dnorm

{stats}

Density distribution for the normal distribution

scale_color_manual

{ggplot2}

Manually sets the colours used in a ggplot color scale to user-specified values

order

{base}

Get indexes that will sort a vector

expression

{base}

Used in plots to add symbols to axes

binomial

{base}

Family argument in glm()

range

{base}

Return range of values

median

{stats}

Get median of a vector

as.character

{base}

Coerce a vector to character

log

{base}

log (default base = e)

quantile

{stats}

Obtain empirical quantiles of a vector

mutate

{dplyr}

Create new variables

cut

{base}

Convert Numeric to Factor

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

xlim

{ggplot2}

A shortcut to set the limits of the x-axis in a ggplot

sd

{stats}

Get standard deviation of a vector

summary

{base}

Obtain summary statistics or detailed regression output

length

{base}

Returns number of elements in an object

group_tt

{tinytable}

Grouping in tinytable

library

{base}

Load an R package

auc

{pRoc}

Returns the area under the curve

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

tibble

{tibble}

A modern data frame from the tidyverse

which

{base}

return indexes of TRUE entries of a logical vector

roc

{pRoc}

Create a Receiver Operating Characteristic (ROC) curve

as.numeric

{base}

Coerce a vector to numeric

head

{utils}

Show first 5 rows of a data frame

min

{base}

Get minimum of a vector

cat

{base}

Concatenate and print objects to the console without quotes or indices

rbind

{base}

Combine R objects by rows

modelsummary

{modelsummary}

Creates regression and data tables

grid.arrange

{gridExtra}

Places graphical objects into a rectangular grid

complete.cases

{stats}

Find Complete Cases

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

glm

{base}

Fits generalized linear models

plot

{graphics}

Generic function from base R to produce a plot

lag

{dplyr}

Shift values in a vector or time series

setwd

{base}

Set Working Directory

unlist

{base}

Flattens a list into a vector by extracting all its elements

c

{base}

Combine values/vectors into a vector

rm

{base}

Remove objects

colMeans

{base}

Computes the means of each column of a numeric matrix or data frame

theme_latex

{tinytable}

A theme for modelsummary/tinytable tables

read_excel

{readxl}

Read an Excel file

nrow

{base}

Get number of rows of a data frame

filter

{dplyr}

Filter out rows of a data frame according to logical vector

is.na

{base}

Check if a value is NA/elements of vector are NA

ungroup

{dplyr}

Resolve grouping created with “group_by”

ordered

{dplyr}

Create an ordered factor

mean

{base}

Get mean of a vector

par

{graphics}

Set parameters of the plotting device

names

{base}

Get or set names of an object

max

{base}

Get maximum of a vector

var

{stats}

Calculate variance

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

The end!